#pragma once

#include <iostream>
#include <fstream>

/*struct WavBlock{
	char[4] tag;
	unsigned len;
};*/

namespace avlib{

class WaveFile{


private:
	std::string m_filename;
	std::ofstream *m_ofs;
	size_t m_total;
	size_t m_data_sz;
public:
	WaveFile(const char *filename);
	~WaveFile();
	
	int init(int ch,int samplerate,int samplebits);
	void add_pcm_data(void *data,size_t len);
	void close();
};
};